const {contextBridge,ipcRenderer} = require('electron')

contextBridge.exposeInMainWorld('timerAPI',{
    onTimerDurationSet:(callback)=>ipcRenderer.on('set-duration',
        (_event,value)=>callback(value)),
    registerTimer:(name,duration)=>ipcRenderer.send('register-timer',name,duration)
})
